package com.jz.beijianbao.common;

import com.jz.beijianbao.legalPersonPlant.service.LegalPlantService;
import com.jz.beijianbao.legalperson.service.LegalPersonService;
import com.jz.beijianbao.price.service.PriceService;
import com.jz.util.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class CommonController {

    @Autowired
    private LegalPersonService legalPersonService;

    //用户下拉框
    @GetMapping("user/ofCurrentUser")
    public ResultVO queryXiaLa(){
        ResultVO resultVO = legalPersonService.queryXiaLa();
        return resultVO;
    }


    @Autowired
    private LegalPlantService legalPlantService;

    //法人下拉
    @GetMapping("legalPerson/ofCurrentUser")
    public ResultVO queryXiaLa(Integer id){
        return legalPlantService.queryPerson(id);
    }


    @Autowired
    private PriceService priceService;
    //含税下拉
    @GetMapping("materialCostPrice/queryAllTaxType")
    public ResultVO queryHanShui(){
        return priceService.queryHanShui();
    }
    // 查询条件 价格分类、币别、当前状态下拉列表三个下拉框
    @PostMapping("metadata/getPullDownList1")
    public ResultVO query(){
        return priceService.queryPullDownList1();
    }









}
